<?php
require('engine/base.php');
function getAlumnosCarrera($id_carrera){
	$query = mysql_query('
			SELECT 
				id_alumno_carrera AS value, 
				CONCAT(apellido,", ",nombres," - ",documento_nro) AS label
			FROM alumnos
			INNER JOIN alumno_carreras USING(id_alumno)
			where id_carrera ='.$id_carrera
		);
	
	$alumnos[''] = '';
	while($alumno = mysql_fetch_object($query)){
		$alumnos[$alumno->value] = $alumno->label;
	}
	return $alumnos;
}

function getMateria($id_materia){
	$query = @mysql_query('
			SELECT descripcion
			FROM materias
			WHERE id_materia ='.$id_materia
			);
	$value = @mysql_fetch_object($query);
	return $value->descripcion;
}

?>